package model;

import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;

public class ImageAll {

	private Image img;
	private int topleft=Graphics.TOP|Graphics.LEFT;
	private int rong[],cao[];//chieu rong va chieu dai tinh theo pixel cua anh
	public ImageAll(Image img)
	{
		this.img=img;
		rong=new int[20];
		cao=new int[20];
		rong[0]=160;	cao[0]=30;
		rong[1]=160;	cao[1]=30;
		rong[2]=160;	cao[2]=30;
		rong[3]=160;	cao[3]=30;
		rong[4]=160;	cao[4]=30;
	}
	public void drawRegion(Graphics g,int vt,int huong,int x_ve,int y_ve)
	{
		int ccao=0;
		for (int i=0;i<vt;i++)
			ccao+=cao[i];
		g.drawRegion(img, 0,ccao,rong[vt],cao[vt],huong, x_ve,y_ve,topleft);
	}
}
